#!/bin/bash
property_file=create_android.properties

groupId=`cat $property_file | grep groupId | awk -F= '{print $2}'`
artifactId=`cat $property_file | grep artifactId | awk -F= '{print $2}'`
version=`cat $property_file | grep ^version | awk -F= '{print $2}'`
android_plugin_version=`cat $property_file | grep android-plugin-version | awk -F= '{print $2}'`
archetypeVersion=`cat $property_file | grep archetypeVersion | awk -F= '{print $2}'`
#echo $groupId
#echo $artifactId
#echo $version
#echo $android_plugin_version
#echo $archetypeVersion
mvn archetype:generate -DarchetypeArtifactId=android-release -DarchetypeGroupId=de.akquinet.android.archetypes -DarchetypeVersion=$archetypeVersion -DgroupId=$groupId \
-DartifactId=$artifactId \
-Dpackage=$groupId \
-Dandroid-plugin-version=$android_plugin_version \
-Dversion=$version
